From: Jasper St. Pierre Date: Mon, 29 Apr 2013 19:33:46 +0000 (-0400) Subject: power: Restyle the power menu for the new design X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3898 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=040bb9354a5c8642f5bc3c0b1b209f7b085fb36b;p=gnome-shell.git power: Restyle the power menu for the new design Remove the icon next to devices, and make the percentage have the "status" color. This is a part of the new system status design, see https://wiki.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/ for design details. https://bugzilla.gnome.org/show_bug.cgi?id=704368 --- diff --git a/js/ui/status/power.js b/js/ui/status/power.js index 22400a38c..515c716ba 100644 --- a/js/ui/status/power.js +++ b/js/ui/status/power.js @@ -175,18 +175,11 @@ const DeviceItem = new Lang.Class({ let [device_id, device_type, icon, percentage, state, time] = device; - this._box = new St.BoxLayout({ style_class: 'popup-device-menu-item' }); this._label = new St.Label({ text: this._deviceTypeToString(device_type) }); - - this._icon = new St.Icon({ gicon: Gio.icon_new_for_string(icon), - style_class: 'popup-menu-icon' }); - - this._box.add_actor(this._icon); - this._box.add_actor(this._label); - this.addActor(this._box); + this.addActor(this._label); let percentLabel = new St.Label({ text: C_("percent of battery remaining", "%d%%").format(Math.round(percentage)), - style_class: 'popup-battery-percentage' }); + style_class: 'popup-status-menu-item popup-battery-percentage' }); this.addActor(percentLabel, { align: St.Align.END }); //FIXME: ideally we would like to expose this._label and percentLabel this.actor.label_actor = percentLabel;